﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using PalFramework.Template;
using PalBattleEmulator.Template;

namespace PalBattleEmulator.Manager.Tempate
{
    public class EnemyArrayTmplManager : PalObjectTmplManager<IArrayTmpl>
    {
        public EnemyArrayTmplManager()
            : base(GlobalConfig.FILE_NAME_EXCEL_DATA_ARRAY_ENEMY, GlobalConfig.EXCEL_SHEET_DATA_ARRAY_ENEMY,
                GlobalConfig.FILE_NAME_XML_DATA_ARRAY_ENEMY, GlobalConfig.XML_ROOT_DATA_ARRAY_ENEMY)
        {
        }




        public override void Initialize()
        {
            List<Dictionary<string, string>> datas = loadFromExcel();
            foreach (Dictionary<string, string> data in datas)
            {
                ArrayTmpl tmpl = new ArrayTmpl();
                tmpl.LoadData(data);
                templates.Add(tmpl.Id, tmpl);
            }
        }
    }
}
